<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html dir="ltr">
    
    <head>
        <style type="text/css">
            body, html { font-family:helvetica,arial,sans-serif; font-size:90%; }
        </style>
        <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js"
        djConfig="parseOnLoad: true">
        </script>
        <script type="text/javascript">

    dojo.require("dijit.form.Form");
    dojo.require("dijit.form.Button");
    dojo.require("dijit.form.ValidationTextBox");
    dojo.require("dijit.form.DateTextBox");

    dojo.addOnLoad(function(){
        var myForm = dijit.byId("myFormTwo");
        dojo.connect(myForm, "onSubmit", function(e){
            e.preventDefault();
            if (myForm.isValid()){
                alert("Ready to submit data: "+dojo.toJson(myForm.attr("value")) );
            }
        });
    });

</script>



        <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css"
        />
    </head>
    
    <body class=" claro ">
  <div dojoType="dijit.form.Form" id="myFormTwo" data-dojo-id="myFormTwo"
encType="multipart/form-data" action="" method="">
    <table style="border: 1px solid #9f9f9f;" cellspacing="10">
        <tr>
            <td>
                <label for="name">Name:
            </td>
            <td>
                <input type="text" name="name" required="true" dojoType="dijit.form.ValidationTextBox"/>
            </td>
        </tr>
        <tr>
            <td>
                <label for="dob">Date of birth:
            </td>
            <td>
                <input type="text" name="dob" dojoType="dijit.form.DateTextBox"/>
            </td>
        </tr>
    </table>

    <button dojoType="dijit.form.Button" onClick="console.log(myFormTwo.attr('value'))">Get Values from form!</button>
    <button dojoType="dijit.form.Button" type="submit" name="submitButtonTwo" value="Submit">Submit</button>
    <button dojoType="dijit.form.Button" type="reset">Reset</button>
</div>

    </body>

</html>
